{% extends "base.html" %}
{% block content %}
    <div class="page-header">
        <h3>管理分类【{{ catalog.name }}】的文档 <small><a href="{{ url_for("admin.new_document",catalog_id=catalog_id) }}" class="btn btn-primary">新增</a></small></h3>
    </div>
    <table class="table">
        <thead>
            <tr>
                <td>目录</td>
                <td>标题</td>
                <td>创建时间</td>
                <td>最后修改时间</td>
                <td>创建人</td>
                <td></td>
            </tr>
        </thead>
        <tbody>
            {% for document in documents %}
                <tr>
                    <td>{% include "include/path.html" %}</td>
                    <td>{{ document.title }}</td>
                    <td>{{ document.create_time|date }}</td>
                    <td>{{ document.last_modify|date }}</td>
                    <td>{{ document.poster }}</td>
                    <td>
                        <div class="btn-group">
                            <a class="btn" href="{{ url_for("admin.edit_document",catalog_id=catalog_id,document_id=document.id) }}"><i class="icon-edit"></i></a>
                            <a class="btn" href=""><i class="icon-remove-circle"></i></a>
                        </div>
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>


{% endblock %}